package org.chargecar.algodev.representativeknn;

public class gridTreeNode {
	private final boolean isLeaf;
	private final gridLeafNode nodeValue;
	private gridTreeNode[][][] subNodes;

	public gridTreeNode(boolean isLeaf, gridLeafNode nodeValue, int x_size,
			int y_size, int z_size) {
		this.isLeaf = isLeaf;
		this.nodeValue = nodeValue;
		this.subNodes = new gridTreeNode[x_size][y_size][z_size];
	}

	public gridLeafNode getNodeValue() {
		return nodeValue;
	}

	public gridTreeNode getSubNode(int x, int y, int z) {
		return subNodes[x][y][z];
	}

	public boolean isLeaf() {
		return this.isLeaf;
	}

	public void setSubNode(gridTreeNode node, int x, int y, int z) {
		subNodes[x][y][z] = node;
	}
}